package com.newland.esp.entity.user;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @param
 * @author lw
 * @descripe
 * @date 2021/10/21 11:08
 * @Version 1.0
 **/
@Data
@TableName("user_role")
public class UserRoleEntity {

    @TableId(value = "id", type = IdType.AUTO)
    private Short id;

    private Short roleId;

    private Short userId;

    //逻辑删除(1:已删除，0:未删除)
    @TableLogic
    private Short isDeleted;

    @TableField("create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    @TableField("update_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
}
